function install() {

  var apps = localStorageJson('apps', {});
  var menuGroups = localStorageJson('menuGroups', []);

  apps['brm-sale'] = {
    name: "brm-sale",
    version: '0.0.1',
    index: {
      name: 'Sale',
      href: '../apps/sale/index.html'
    },
    menus: [{}]
  }
  menuGroups.splice(0, 0, {
    name: '销售',
    menus: [
//  {
//    name: 'pos',
//    icons: 'mui-icon iconfont icon-posji',
//    href: '../apps/sale/pos.html'
//  }, 
    {
      name: '订单',
      icons: 'mui-icon iconfont icon-order',
      href: '/apps/sale/order.html',
      id: 'order_list',
      count: 3
    }, {
      name: '客户',
      icons: 'mui-icon iconfont icon-kehu',
      href: '/apps/sale/customer.html',
      id: 'customer_list'
    }, {
      name: '产品',
      icons: 'mui-icon iconfont icon-chanpin',
      href: '/apps/base/product.html',
      id: 'product_list'
    }, {
      name: '报表',
      icons: 'mui-icon iconfont icon-report',
      href: '/apps/sale/report.html',
      id: 'sale_report'
    }]
  });
  localStorageJson('apps', apps, true);
  localStorageJson('menuGroups', menuGroups, true);
}
window.$app = {
  install: install
}